package com.pattern.design.designpattern.Compose;

import com.pattern.design.designpattern.MainActivity;

import java.util.ArrayList;
import java.util.List;

/**
 * author:harisucici on 2018/10/11 15:30
 * email:harisucici@gmail.com
 * name:
 * todo:
 */
public class CompositeLeaf extends Component {
    private String name;

    /**
     * Instantiates a new Composite leaf.
     *
     * @param s the s
     */
    public CompositeLeaf(String s) {
        super(s);
        this.name = s;
    }

    @Override
    public void doSth() {
        MainActivity.systemOut(name);
    }
}
